<!-- UserList.vue -->
<template>
  <div class="box">
    <h3>用 v-for 渲染 user 对象</h3>
    <ul>
      <li v-for="(value, key) in user" :key="key">
        <span class="k">{{ key }}：</span>
        <span class="v">{{ value }}</span>
      </li>
    </ul>
  </div>
</template>

<script setup>
const user = {
  id: 11,
  name: '小明',
  gender: '男'
}
</script>

<style scoped>

</style>